
/*
	"Hemi" JavaScript Framework
	Engine for Web Applications 3.1
	Composite file "hemi.comp.js" release: 3.1.9
	Copyright 2002 - 2010. All Rights Reserved.
	Author: Stephen W. Cote
	Email: sw.cote@gmail.com
	Project: http://www.whitefrost.com/Hemi/
	BSD License: http://www.whitefrost.com/Hemi.license.txt
*/
(function(){H.namespace("event",H,{getEvent:
function(o){return(typeof event==D.O)?event:o;},cancelEvent:
function(o){(typeof o.preventDefault!=D.F)?(o.returnValue=false):o.preventDefault();o.cancelBubble=true;},getEventDestination:
function(e){return(e.relatedTarget)?e.relatedTarget:e.toElement;},getEventOrigination:
function(e){return(e.relatedTarget)?e.relatedTarget:e.fromElement;},getEventSource:
function(o){var s=H.event.getEvent(o);if(s==null){H.message.service.S("Bad event reference","515.3",1);return o;}return(s.target)?s.target:s.srcElement;},addScopeBuffer:
function(o){var e="scopeHandler";try{o[e]=function(s,r,x,l){var b=(typeof r==D.O&&r!=null?1:0),t=this,e,h,f;r=(b)?r:t;e="_prehandle_"+s;b=(l?1:0);h="f=function(){\n"+"try{\n"+"var o="+(b?'Hemi.registry.service.getObject(\"'+r.i+'\")':"this")+";\n"+"if(typeof o!=\"object\"||o==null){H.logDebug('Object "+r.i+" is invalid for event "+s+"');return;}\nreturn o."+(!x?"_handle_":"")+s+".apply(o,arguments);"+"}\ncatch(e){alert(r.i+\"::\"+s+\"::\"+(e.description?e.description:e.message)+\"\\n\"+Hemi.error.traceRoute(f.caller));}\n"+"}";eval(h);if(!x)t[e]=f;return f;};o["getScopeHandler"]=function(s){return "Hemi.registry.service.getObject(\""+this.i+"\")._prehandle_"+s+"()";};}catch(e){alert("Error:"+e.description);}},disableMotionCapture:
function(o){var f;if(typeof document.removeEventListener==D.F){document.removeEventListener("mousemove",o.onmousemove,true);document.removeEventListener("mouseup",o.onmouseup,true);}else if(typeof(f=o.releaseCapture)!=D.U)f();},enableMotionCapture:
function(o){var f;if(typeof document.addEventListener==D.F){document.addEventListener("mousemove",o.onmousemove,true);document.addEventListener("mouseup",o.onmouseup,true);}else if(typeof(f=o.setCapture)!=D.U)f();},addEventListener:
function(o,e,f,b){if(typeof o.addEventListener!=D.U)o.addEventListener(e,f,b);else if(typeof o.attachEvent!=D.U)o.attachEvent("on"+e,f);},removeEventListener:
function(o,e,f,b){if(typeof o.removeEventListener!=D.U)o.removeEventListener(e,f,b);else if(typeof o.detachEvent!=D.U)o.detachEvent("on"+e,f);}});})();
/* End Hemi Framework 3.1 */
